home *** CD-ROM | disk | FTP | other *** search
-
- *****************************************************************
- * *
- * ADDTEXT *
- * ------- *
- * *
- * Adds appropriate print commands depending on required *
- * code output. User can select from Pascal, C or script *
- * output. *
- * *
- * Author: A N Peck *
- * *
- * Date: 09 Feb 1995 *
- * *
- *****************************************************************
-
- Many times have I written text for programs or script files, and then
- had to add the printf, writeln or echo commands by hand. I decided to
- automate the process and AddText was born!
-
- Example
- -------
-
- Let's say we have a text file called "Sheep.pme" which contains the
- following tortured prose...
-
- Little Bo Peep was a weird little girl
-
- Who's main love interest was ewe
-
- How extraordinary this small canary
-
- Which it's bound tutu
-
- ...which we would like to have in a program or script file. Selecting
- the Script option would produce a file which looks like...
-
- ; Courtesy of ADDTEXT - A N Peck (1995)
-
- echo ""
- echo " Little Bo Peep was a weird little girl"
- echo ""
- echo " Who's main love interest was ewe"
- echo ""
- echo " How extraordinary this small canary"
- echo ""
- echo " Which it's bound tutu"
- echo ""
-
- You could now execute this script file to produce the original text.
-
- The Pascal version would read...
-
- { Courtesy of ADDTEXT - A N Peck (1995) }
-
- Writeln ('');
- Writeln (' Little Bo Peep was a weird little girl');
- Writeln ('');
- Writeln (' Who''s main love interest was ewe');
- Writeln ('');
- Writeln (' How extraordinary this small canary');
- Writeln ('');
- Writeln (' Which it''s bound tutu');
- Writeln ('');
-
- Note that the extra apostrophes have been added.
-
- Finally the C option produces...
-
- /* Courtesy of ADDTEXT - A N Peck (1995) */
-
- Printf ("\n");
- Printf (" Little Bo Peep was a weird little girl\n");
- Printf ("\n");
- Printf (" Who's main love interest was ewe\n");
- Printf ("\n");
- Printf (" How extraordinary this small canary\n");
- Printf ("\n");
- Printf (" Which it's bound tutu\n");
- Printf ("\n");
-
- And that's all it does! No washing of dishes or carrying out of dirty
- linen, but perhaps a bit easier to insert text into your next program or
- script file.
-
- The program was written in Assembly with help from Hextract (Chas A
- Wyndham), EdwordPro (Martin Reddy), PhxAss/PhxLnk (Frank Wille),
- Convbrush (David Kinder), Iconian (Chad Randall), DPaint (Electronic
- Arts), and some others I've forgotten. The source is provided for your
- amusement.
-
- I hope you find this program useful. I take no responsibility for it's
- actions but it is freeware! Enjoy...
-
-
- Anthony N Peck
-
- 68 Woralul St
-
- Waramanga ACT 2611
-
- Australia
-
- E-mail: Anthony.Peck@Radford.act.edu.au
-
-
-